#include <iostream>
#include <map>
using namespace std;
int main(){
    map<char,int>foo,bar;
    foo['x'] = 1;
    foo['y'] = 2;
    bar['a'] = 10;
    bar['b'] = 20;
    bar['c'] = 30;
    bar.swap(foo);
    for(auto e:bar){
        cout<<e.first<<" : "<<e.second<<endl;
    }

}